Hi everyone,
I'm using a jQuery script along with an AJAX call to get some data from a remote server.
The script is called on page ready state.
The data are returned as a JSON object, in particular as an array of objects; something like this:
"employees":[
{"firstName":"John", "lastName":"Doe"},
{"firstName":"Anna", "lastName":"Smith"},
{"firstName":"Peter", "lastName":"Jones"}
]
Using another jQuery script I'm filtering these objects, basing on the user interaction. Basically I keep just some of them, and drop the others. For example, considering the previous array, when the user confirms the JSON is reduced to:
"employees":[
{"firstName":"John", "lastName":"Doe"},
{"firstName":"Anna", "lastName":"Smith"}
]
What I need to do is to store the filtered objects into the database, and so I would need something to pass the filtered JSON to the model, in order to save the objects in the database using a Create operation.
Thanks,
Davide